//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Repostspace service.
///
/// AWS re:Post Private is a private version of AWS re:Post for enterprises with Enterprise Support or Enterprise On-Ramp Support plans. It provides access to knowledge and experts to accelerate cloud adoption and increase developer productivity. With your organization-specific private re:Post, you can build an organization-specific developer community that drives efficiencies at scale and provides access to valuable knowledge resources. Additionally, re:Post Private centralizes trusted AWS technical content and offers private discussion forums to improve how your teams collaborate internally and with AWS to remove technical obstacles, accelerate innovation, and scale more efficiently in the cloud.
public struct Repostspace: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Repostspace client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "Repostspace",
            serviceIdentifier: "repostspace",
            serviceProtocol: .restjson,
            apiVersion: "2022-05-13",
            endpoint: endpoint,
            errorType: RepostspaceErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Add role to multiple users or groups in a private re:Post channel.
    @Sendable
    @inlinable
    public func batchAddChannelRoleToAccessors(_ input: BatchAddChannelRoleToAccessorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchAddChannelRoleToAccessorsOutput {
        try await self.client.execute(
            operation: "BatchAddChannelRoleToAccessors", 
            path: "/spaces/{spaceId}/channels/{channelId}/roles", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add role to multiple users or groups in a private re:Post channel.
    ///
    /// Parameters:
    ///   - accessorIds: The user or group identifiers to add the role to.
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - channelRole: The channel role to add to the users or groups.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchAddChannelRoleToAccessors(
        accessorIds: [String],
        channelId: String,
        channelRole: ChannelRole,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchAddChannelRoleToAccessorsOutput {
        let input = BatchAddChannelRoleToAccessorsInput(
            accessorIds: accessorIds, 
            channelId: channelId, 
            channelRole: channelRole, 
            spaceId: spaceId
        )
        return try await self.batchAddChannelRoleToAccessors(input, logger: logger)
    }

    /// Add a role to multiple users or groups in a private re:Post.
    @Sendable
    @inlinable
    public func batchAddRole(_ input: BatchAddRoleInput, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchAddRoleOutput {
        try await self.client.execute(
            operation: "BatchAddRole", 
            path: "/spaces/{spaceId}/roles", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add a role to multiple users or groups in a private re:Post.
    ///
    /// Parameters:
    ///   - accessorIds: The user or group accessor identifiers to add the role to.
    ///   - role: The role to add to the users or groups.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchAddRole(
        accessorIds: [String],
        role: Role,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchAddRoleOutput {
        let input = BatchAddRoleInput(
            accessorIds: accessorIds, 
            role: role, 
            spaceId: spaceId
        )
        return try await self.batchAddRole(input, logger: logger)
    }

    /// Remove a role from multiple users or groups in a private re:Post channel.
    @Sendable
    @inlinable
    public func batchRemoveChannelRoleFromAccessors(_ input: BatchRemoveChannelRoleFromAccessorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchRemoveChannelRoleFromAccessorsOutput {
        try await self.client.execute(
            operation: "BatchRemoveChannelRoleFromAccessors", 
            path: "/spaces/{spaceId}/channels/{channelId}/roles", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove a role from multiple users or groups in a private re:Post channel.
    ///
    /// Parameters:
    ///   - accessorIds: The users or groups identifiers to remove the role from.
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - channelRole: The channel role to remove from the users or groups.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchRemoveChannelRoleFromAccessors(
        accessorIds: [String],
        channelId: String,
        channelRole: ChannelRole,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchRemoveChannelRoleFromAccessorsOutput {
        let input = BatchRemoveChannelRoleFromAccessorsInput(
            accessorIds: accessorIds, 
            channelId: channelId, 
            channelRole: channelRole, 
            spaceId: spaceId
        )
        return try await self.batchRemoveChannelRoleFromAccessors(input, logger: logger)
    }

    /// Remove a role from multiple users or groups in a private re:Post.
    @Sendable
    @inlinable
    public func batchRemoveRole(_ input: BatchRemoveRoleInput, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchRemoveRoleOutput {
        try await self.client.execute(
            operation: "BatchRemoveRole", 
            path: "/spaces/{spaceId}/roles", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove a role from multiple users or groups in a private re:Post.
    ///
    /// Parameters:
    ///   - accessorIds: The user or group accessor identifiers to remove the role from.
    ///   - role: The role to remove from the users or groups.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchRemoveRole(
        accessorIds: [String],
        role: Role,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchRemoveRoleOutput {
        let input = BatchRemoveRoleInput(
            accessorIds: accessorIds, 
            role: role, 
            spaceId: spaceId
        )
        return try await self.batchRemoveRole(input, logger: logger)
    }

    /// Creates a channel in an AWS re:Post Private private re:Post.
    @Sendable
    @inlinable
    public func createChannel(_ input: CreateChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelOutput {
        try await self.client.execute(
            operation: "CreateChannel", 
            path: "/spaces/{spaceId}/channels", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a channel in an AWS re:Post Private private re:Post.
    ///
    /// Parameters:
    ///   - channelDescription: A description for the channel. This is used only to help you identify this channel.
    ///   - channelName: The name for the channel. This must be unique per private re:Post.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannel(
        channelDescription: String? = nil,
        channelName: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelOutput {
        let input = CreateChannelInput(
            channelDescription: channelDescription, 
            channelName: channelName, 
            spaceId: spaceId
        )
        return try await self.createChannel(input, logger: logger)
    }

    /// Creates an AWS re:Post Private private re:Post.
    @Sendable
    @inlinable
    public func createSpace(_ input: CreateSpaceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSpaceOutput {
        try await self.client.execute(
            operation: "CreateSpace", 
            path: "/spaces", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an AWS re:Post Private private re:Post.
    ///
    /// Parameters:
    ///   - description: A description for the private re:Post. This is used only to help you identify this private re:Post.
    ///   - name: The name for the private re:Post. This must be unique in your account.
    ///   - roleArn: The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.
    ///   - subdomain: The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.
    ///   - supportedEmailDomains: 
    ///   - tags: The list of tags associated with the private re:Post.
    ///   - tier: The pricing tier for the private re:Post.
    ///   - userKMSKey: The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSpace(
        description: String? = nil,
        name: String,
        roleArn: String? = nil,
        subdomain: String,
        supportedEmailDomains: SupportedEmailDomainsParameters? = nil,
        tags: [String: String]? = nil,
        tier: TierLevel,
        userKMSKey: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSpaceOutput {
        let input = CreateSpaceInput(
            description: description, 
            name: name, 
            roleArn: roleArn, 
            subdomain: subdomain, 
            supportedEmailDomains: supportedEmailDomains, 
            tags: tags, 
            tier: tier, 
            userKMSKey: userKMSKey
        )
        return try await self.createSpace(input, logger: logger)
    }

    /// Deletes an AWS re:Post Private private re:Post.
    @Sendable
    @inlinable
    public func deleteSpace(_ input: DeleteSpaceInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteSpace", 
            path: "/spaces/{spaceId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an AWS re:Post Private private re:Post.
    ///
    /// Parameters:
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteSpace(
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteSpaceInput(
            spaceId: spaceId
        )
        return try await self.deleteSpace(input, logger: logger)
    }

    /// Removes the user or group from the list of administrators of the private re:Post.
    @Sendable
    @inlinable
    public func deregisterAdmin(_ input: DeregisterAdminInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeregisterAdmin", 
            path: "/spaces/{spaceId}/admins/{adminId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the user or group from the list of administrators of the private re:Post.
    ///
    /// Parameters:
    ///   - adminId: The ID of the admin to remove.
    ///   - spaceId: The ID of the private re:Post to remove the admin from.
    ///   - logger: Logger use during operation
    @inlinable
    public func deregisterAdmin(
        adminId: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeregisterAdminInput(
            adminId: adminId, 
            spaceId: spaceId
        )
        return try await self.deregisterAdmin(input, logger: logger)
    }

    /// Displays information about a channel in a private re:Post.
    @Sendable
    @inlinable
    public func getChannel(_ input: GetChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetChannelOutput {
        try await self.client.execute(
            operation: "GetChannel", 
            path: "/spaces/{spaceId}/channels/{channelId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays information about a channel in a private re:Post.
    ///
    /// Parameters:
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func getChannel(
        channelId: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetChannelOutput {
        let input = GetChannelInput(
            channelId: channelId, 
            spaceId: spaceId
        )
        return try await self.getChannel(input, logger: logger)
    }

    /// Displays information about the AWS re:Post Private private re:Post.
    @Sendable
    @inlinable
    public func getSpace(_ input: GetSpaceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSpaceOutput {
        try await self.client.execute(
            operation: "GetSpace", 
            path: "/spaces/{spaceId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays information about the AWS re:Post Private private re:Post.
    ///
    /// Parameters:
    ///   - spaceId: The ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSpace(
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSpaceOutput {
        let input = GetSpaceInput(
            spaceId: spaceId
        )
        return try await self.getSpace(input, logger: logger)
    }

    /// Returns the list of channel within a private re:Post with some information about each channel.
    @Sendable
    @inlinable
    public func listChannels(_ input: ListChannelsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelsOutput {
        try await self.client.execute(
            operation: "ListChannels", 
            path: "/spaces/{spaceId}/channels", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the list of channel within a private re:Post with some information about each channel.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of channels to include in the results.
    ///   - nextToken: The token for the next set of channel to return. You receive this token from a previous ListChannels operation.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannels(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelsOutput {
        let input = ListChannelsInput(
            maxResults: maxResults, 
            nextToken: nextToken, 
            spaceId: spaceId
        )
        return try await self.listChannels(input, logger: logger)
    }

    /// Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.
    @Sendable
    @inlinable
    public func listSpaces(_ input: ListSpacesInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSpacesOutput {
        try await self.client.execute(
            operation: "ListSpaces", 
            path: "/spaces", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of private re:Posts to include in the results.
    ///   - nextToken: The token for the next set of private re:Posts to return. You receive this token from a previous ListSpaces operation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSpaces(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSpacesOutput {
        let input = ListSpacesInput(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listSpaces(input, logger: logger)
    }

    /// Returns the tags that are associated with the AWS re:Post Private resource specified by the resourceArn. The only resource that can be tagged is a private re:Post.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the tags that are associated with the AWS re:Post Private resource specified by the resourceArn. The only resource that can be tagged is a private re:Post.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource that the tags are associated with.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Adds a user or group to the list of administrators of the private re:Post.
    @Sendable
    @inlinable
    public func registerAdmin(_ input: RegisterAdminInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RegisterAdmin", 
            path: "/spaces/{spaceId}/admins/{adminId}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a user or group to the list of administrators of the private re:Post.
    ///
    /// Parameters:
    ///   - adminId: The ID of the administrator.
    ///   - spaceId: The ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerAdmin(
        adminId: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RegisterAdminInput(
            adminId: adminId, 
            spaceId: spaceId
        )
        return try await self.registerAdmin(input, logger: logger)
    }

    /// Sends an invitation email to selected users and groups.
    @Sendable
    @inlinable
    public func sendInvites(_ input: SendInvitesInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "SendInvites", 
            path: "/spaces/{spaceId}/invite", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sends an invitation email to selected users and groups.
    ///
    /// Parameters:
    ///   - accessorIds: The array of identifiers for the users and groups.
    ///   - body: The body of the invite.
    ///   - spaceId: The ID of the private re:Post.
    ///   - title: The title of the invite.
    ///   - logger: Logger use during operation
    @inlinable
    public func sendInvites(
        accessorIds: [String],
        body: String,
        spaceId: String,
        title: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = SendInvitesInput(
            accessorIds: accessorIds, 
            body: body, 
            spaceId: spaceId, 
            title: title
        )
        return try await self.sendInvites(input, logger: logger)
    }

    /// Associates tags with an AWS re:Post Private resource. Currently, the only resource that can be tagged is the private re:Post. If you specify a new tag key for the resource, the tag is appended to the list of tags that are associated with the resource. If you specify a tag key that’s already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates tags with an AWS re:Post Private resource. Currently, the only resource that can be tagged is the private re:Post. If you specify a new tag key for the resource, the tag is appended to the list of tags that are associated with the resource. If you specify a tag key that’s already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource that the tag is associated with.
    ///   - tags: The list of tag keys and values that must be associated with the resource. You can associate tag keys only, tags (key and values) only, or a combination of tag keys and tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes the association of the tag with the AWS re:Post Private resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the association of the tag with the AWS re:Post Private resource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource.
    ///   - tagKeys: The key values of the tag.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Modifies an existing channel.
    @Sendable
    @inlinable
    public func updateChannel(_ input: UpdateChannelInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChannelOutput {
        try await self.client.execute(
            operation: "UpdateChannel", 
            path: "/spaces/{spaceId}/channels/{channelId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies an existing channel.
    ///
    /// Parameters:
    ///   - channelDescription: A description for the channel. This is used only to help you identify this channel.
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - channelName: The name for the channel. This must be unique per private re:Post.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateChannel(
        channelDescription: String? = nil,
        channelId: String,
        channelName: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChannelOutput {
        let input = UpdateChannelInput(
            channelDescription: channelDescription, 
            channelId: channelId, 
            channelName: channelName, 
            spaceId: spaceId
        )
        return try await self.updateChannel(input, logger: logger)
    }

    /// Modifies an existing AWS re:Post Private private re:Post.
    @Sendable
    @inlinable
    public func updateSpace(_ input: UpdateSpaceInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UpdateSpace", 
            path: "/spaces/{spaceId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies an existing AWS re:Post Private private re:Post.
    ///
    /// Parameters:
    ///   - description: A description for the private re:Post. This is used only to help you identify this private re:Post.
    ///   - roleArn: The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.
    ///   - spaceId: The unique ID of this private re:Post.
    ///   - supportedEmailDomains: 
    ///   - tier: The pricing tier of this private re:Post.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateSpace(
        description: String? = nil,
        roleArn: String? = nil,
        spaceId: String,
        supportedEmailDomains: SupportedEmailDomainsParameters? = nil,
        tier: TierLevel? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UpdateSpaceInput(
            description: description, 
            roleArn: roleArn, 
            spaceId: spaceId, 
            supportedEmailDomains: supportedEmailDomains, 
            tier: tier
        )
        return try await self.updateSpace(input, logger: logger)
    }
}

extension Repostspace {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Repostspace, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Repostspace {
    /// Return PaginatorSequence for operation ``listChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsPaginator(
        _ input: ListChannelsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelsInput, ListChannelsOutput> {
        return .init(
            input: input,
            command: self.listChannels,
            inputKey: \ListChannelsInput.nextToken,
            outputKey: \ListChannelsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of channels to include in the results.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsPaginator(
        maxResults: Int? = nil,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelsInput, ListChannelsOutput> {
        let input = ListChannelsInput(
            maxResults: maxResults, 
            spaceId: spaceId
        )
        return self.listChannelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSpaces(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSpacesPaginator(
        _ input: ListSpacesInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListSpacesInput, ListSpacesOutput> {
        return .init(
            input: input,
            command: self.listSpaces,
            inputKey: \ListSpacesInput.nextToken,
            outputKey: \ListSpacesOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSpaces(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of private re:Posts to include in the results.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSpacesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListSpacesInput, ListSpacesOutput> {
        let input = ListSpacesInput(
            maxResults: maxResults
        )
        return self.listSpacesPaginator(input, logger: logger)
    }
}

extension Repostspace.ListChannelsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Repostspace.ListChannelsInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            spaceId: self.spaceId
        )
    }
}

extension Repostspace.ListSpacesInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Repostspace.ListSpacesInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

// MARK: Waiters

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Repostspace {
    /// Waiter for operation ``getChannel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilChannelCreated(
        _ input: GetChannelInput,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetChannelInput, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("channelStatus", expected: "CREATED")),
                .init(state: .failure, matcher: try! JMESPathMatcher("channelStatus", expected: "CREATE_FAILED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("channelStatus", expected: "CREATING")),
            ],
            command: self.getChannel
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getChannel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilChannelCreated(
        channelId: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetChannelInput(
            channelId: channelId, 
            spaceId: spaceId
        )
        try await self.waitUntilChannelCreated(input, logger: logger)
    }

    /// Waiter for operation ``getChannel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilChannelDeleted(
        _ input: GetChannelInput,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetChannelInput, _>(
            acceptors: [
                .init(state: .success, matcher: AWSErrorCodeMatcher("ResourceNotFoundException")),
                .init(state: .success, matcher: try! JMESPathMatcher("channelStatus", expected: "DELETED")),
                .init(state: .failure, matcher: try! JMESPathMatcher("channelStatus", expected: "DELETE_FAILED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("channelStatus", expected: "DELETING")),
            ],
            command: self.getChannel
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getChannel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelId: The unique ID of the private re:Post channel.
    ///   - spaceId: The unique ID of the private re:Post.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilChannelDeleted(
        channelId: String,
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetChannelInput(
            channelId: channelId, 
            spaceId: spaceId
        )
        try await self.waitUntilChannelDeleted(input, logger: logger)
    }

    /// Waiter for operation ``getSpace(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilSpaceCreated(
        _ input: GetSpaceInput,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetSpaceInput, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("status", expected: "CREATED")),
                .init(state: .failure, matcher: try! JMESPathMatcher("status", expected: "CREATE_FAILED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("status", expected: "CREATING")),
            ],
            minDelayTime: .seconds(300),
            maxDelayTime: .seconds(7200),
            command: self.getSpace
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getSpace(_:logger:)``.
    ///
    /// - Parameters:
    ///   - spaceId: The ID of the private re:Post.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilSpaceCreated(
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetSpaceInput(
            spaceId: spaceId
        )
        try await self.waitUntilSpaceCreated(input, logger: logger)
    }

    /// Waiter for operation ``getSpace(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilSpaceDeleted(
        _ input: GetSpaceInput,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetSpaceInput, _>(
            acceptors: [
                .init(state: .success, matcher: AWSErrorCodeMatcher("ResourceNotFoundException")),
                .init(state: .success, matcher: try! JMESPathMatcher("status", expected: "DELETED")),
                .init(state: .failure, matcher: try! JMESPathMatcher("status", expected: "DELETE_FAILED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("status", expected: "DELETING")),
            ],
            minDelayTime: .seconds(300),
            maxDelayTime: .seconds(7200),
            command: self.getSpace
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getSpace(_:logger:)``.
    ///
    /// - Parameters:
    ///   - spaceId: The ID of the private re:Post.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilSpaceDeleted(
        spaceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetSpaceInput(
            spaceId: spaceId
        )
        try await self.waitUntilSpaceDeleted(input, logger: logger)
    }
}
